package com.java.function;

import com.java.function.bean.Person;

import java.util.function.Supplier;

public class PersonFactory {

    private Supplier<Person> supplier;

    public PersonFactory(Supplier<Person> supplier){
        this.supplier = supplier;
    }

    public Person getPersion(){
        return this.supplier.get();
    }
}
